package com.example.demo.crypto;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import top.jfunc.common.crypto.Crypto;
import top.jfunc.common.crypto.asymmetric.RSA;
import top.jfunc.common.crypto.symmetric.AesCrypto;

@Configuration
    public class RRCryptoConfig {
    final String publicKey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyvb1skrsNnB2d0wo3Jq8" +
            "3CbDCuqpRyd/D1z0bi8YDBWJc7dPo2pNbceO/4e/8Pi8YZmx7wR/wA3OIvwSBWrT" +
            "mdgVVIHCSfx8bmQqGmvbGgaEvyXrp4Vn0JChbMyAimNk8ETDslF0ENT+8ybGZHb/" +
            "4x/JOYA7loaGf+O7Hdzodp5xy32wAc70BAfR34RG5ziXdDyawtXcxlYOCGNMC8cD" +
            "WEn8EE+IfLSqQ3mgRi6N7dgfMDLVhxJ1BCwEH3dEpBRHMJBB6aTUlMHBcI3W9+Ak" +
            "vAw+HwXtvxaZqhUj/sFkeVXHSi+miKXH7BwkuSgog7CBbtsaZCLNprBciw1IWRNL" +
            "swIDAQAB";
    final String privateKey="MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDK9vWySuw2cHZ3" +
            "TCjcmrzcJsMK6qlHJ38PXPRuLxgMFYlzt0+jak1tx47/h7/w+LxhmbHvBH/ADc4i" +
            "/BIFatOZ2BVUgcJJ/HxuZCoaa9saBoS/JeunhWfQkKFszICKY2TwRMOyUXQQ1P7z" +
            "JsZkdv/jH8k5gDuWhoZ/47sd3Oh2nnHLfbABzvQEB9HfhEbnOJd0PJrC1dzGVg4I" +
            "Y0wLxwNYSfwQT4h8tKpDeaBGLo3t2B8wMtWHEnUELAQfd0SkFEcwkEHppNSUwcFw" +
            "jdb34CS8DD4fBe2/FpmqFSP+wWR5VcdKL6aIpcfsHCS5KCiDsIFu2xpkIs2msFyL" +
            "DUhZE0uzAgMBAAECggEAZq3ngKp8s9HTbOj/pxM1Rl7pv2UV/GRT2G7bTb7PeJWQ" +
            "sxTi2jZWM5qIkmeXyA3eJ7Y8mUH6ayvQxEwnxcvUfvkdWWJH62wreyF7V2CHOLRh" +
            "hd5mSJqp+Y6hy8vtn5VHJHJ1WonwoO9Qh6xvI7Y8ICgdgdSI0M7/zkVkjWgLxq3c" +
            "9HKZ8ZbB2bmBIry0fvinpxCT2WMxYz1krLL0NfzqzPho/X3fU6aFIA7J0ZNSEE7T" +
            "FSRknaC6tgYiMIoMxbyYI2ou5HKtJMGL2THkY7kOjlHc848ZpjW37tM+NcbxfQMX" +
            "Spl3EpWTfcQh2rxh9VTX9TptpB0WZNAVifhV3jMrYQKBgQDsTy1X/IgVrR9LM/3z" +
            "IOK9m16xA3n8r2s/81mEzdh9v+5tXSLme/wCG24VIlJvPuGwMCT/+lNew4L5cTu3" +
            "0T8yqz7FfES7Q0Z3mH68UmpOQw3hJP32u7g0HNEpoO8t8AnNavhVdADpJxUEA3lC" +
            "aC3HmRs1tRZdeDppLiku4SmkkQKBgQDb4H5YKHsHwLvb/xAS1049m84R0kSe2U2H" +
            "w3Ustz95Q9yanVjmhoB8bxTw+T6vZirACxeCxvZiYvegp3OS0SN3xTmf9LHVBRzO" +
            "TBy+PZzrv+kcr5EARr32VHNm6ZlMFjq3cqoA/LP1AR4ztIP0jmXEzm88zYrJKaGY" +
            "suZPHKd+AwKBgBOUQ9eEbuoM3AjpF+NrGB5Jn0DfXt4W0rYLvaEJRSS2IFUjYF7k" +
            "au7pwucxXs8k0KI+evJSlVHGtTVhsmb6iVfzZFIMh81UN6R1GBsWYQR2/dFntTsa" +
            "NprqwFHIqciOmOFSOZ0q7WBkApPAje14oEJnZx++D0pTSdOpJXRi54ZhAoGAe6+D" +
            "IxBSdQAELTMD1bVr+9gjSX8gvsK6jD51MZw7hnmYJRmSIstSh6zs+MkcbApqzfDv" +
            "Xs+RVbMaXTMVHmerLfqx+brqNkxT8fB60sFR/oPMHCjexmsE/QZwjFmntFdk3EES" +
            "RM/iY1YnqSpIeE+KC/WcOXXeNl7G2mD4kVQrHAUCgYEAlvZo1udXq4aEowA3KFpp" +
            "V2FAIQkbbZLEwfjGfmAtSZe3XKqGMdoro8sBEXhUWlmLeYsF45jsqHrlcGfTgnzu" +
            "Se/evWpwv4kxE+35CnK9JiU28fFE1UVmqxZWMv4sRU3d0/IL7yP9SrLHgdyzjDli" +
            "LYANvB/gn7h5vxHYAYOGyx0=";
        /**
         * 加密解密方式使用一样的
         */
        @Bean("rrCrypto")
        public Crypto rrCrypto(){
            return new RSA(privateKey,publicKey);
        }
    }
